package IOxuliehua;

import java.io.*;

public class OISDemo {
    public static void main(String[] args)  {
        InputStream is = null;
        try {
            is = new FileInputStream("person.obj");
            ObjectInputStream ois = new ObjectInputStream(is);
            person son = (person) ois.readObject();
            System.out.println(son);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
    }

